package com.guanglan.serviceImpl;

import com.guanglan.entity.SysPermission;
import com.guanglan.mapper.SysPermissionMapper;
import com.guanglan.service.SysPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * 作者: 光蓝Comet
 * Date: 2018-06-20 15:34
 * Description: 一句话说明这个类的作用
 * Since 1.0
 */
@Service
public class SysPermissionServiceImpl implements SysPermissionService {

    @Autowired
    private SysPermissionMapper sysPermissionMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return sysPermissionMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(SysPermission sysPermission) {
        return sysPermissionMapper.insert(sysPermission);
    }

    @Override
    public int insertSelective(SysPermission sysPermission) {
        return sysPermissionMapper.insertSelective(sysPermission);
    }

    @Override
    public SysPermission selectByPrimaryKey(Long id) {
        return sysPermissionMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(SysPermission sysPermission) {
        return sysPermissionMapper.updateByPrimaryKeySelective(sysPermission);
    }

    @Override
    public int updateByPrimaryKey(SysPermission sysPermission) {
        return sysPermissionMapper.updateByPrimaryKey(sysPermission);
    }

    @Override
    public List<SysPermission> selectSysPermissionsByMenuName(String menuName) {
        return sysPermissionMapper.selectSysPermissionsByMenuName(menuName);
    }

    @Override
    public List<SysPermission> getPerms() {
        return sysPermissionMapper.getPerms();
    }
}
